package com.echo.model;

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;

import java.io.Serializable;
import java.util.Calendar;
import java.util.List;

/**
 * Created by EchoGe on 2016/6/8.
 */
@Table(name="sports")
public class Sport extends Model implements Serializable{


    public static final int TYPE_RUNNING=0,TYPE_RIDING=1,TYPE_CLIMBING=2;

    @Column(name="_id",unique = true,onUniqueConflict = Column.ConflictAction.REPLACE)
    private long id;
    @Column(name="user_id")
    private long userId;
    @Column(name="sport_time")
    private int time;
    @Column(name="date")
    private String date;
    @Column(name="start_time")
    private Calendar start;
    @Column(name="distance")
    private int distance;
    @Column(name="calories")
    private int calories;
    @Column(name="snapshot")
    private byte[] snapshot;
    @Column(name="snapshot_url")
    private String snapshotUrl;
    @Column(name="type")
    private int type;

    public Sport() {
        super();
    }

    public long getid() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Calendar getStart() {
        return start;
    }

    public void setStart(Calendar start) {
        this.start = start;
    }

    public int getDistance() {
        return distance;
    }

    public void setDistance(int distance) {
        this.distance = distance;
    }

    public int getCalories() {
        return calories;
    }

    public void setCalories(int calories) {
        this.calories = calories;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public byte[] getSnapshot() {
        return snapshot;
    }

    public void setSnapshot(byte[] snapshot) {
        this.snapshot = snapshot;
    }

    public String getSnapshotUrl() {
        return snapshotUrl;
    }

    public void setSnapshotUrl(String snapshotUrl) {
        this.snapshotUrl = snapshotUrl;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
